<?php
/**
 * Smarty plugin
 * -------------------------------------------------------------
 * File:     insert.module_header.php
 * Type:     time
 * Name:     time
 * Author:   王超, <wisoch@hotmail.com>
 * Purpose:  输出页面头
 * -------------------------------------------------------------
 */

function smarty_insert_module_header($params, $smarty) {
	$userInfo = $smarty->getConfigVars('userInfo');
	if(!$userInfo) {
		$mUser = new User_model();
		$userInfo = $mUser->currUser();
		$smarty->assign('userInfo', $userInfo);
	}
	$smarty->assign('module', $params['module']);
	$html = $smarty->fetch('module/module_header.html');
	return $html;
}
?>